package com.kun.util;

import com.kun.dao.BaseDao;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class MyUtils {

    /**
     * 通过配置文件名获取配置文件信息
     * @param fileName
     * @return
     */
    public static Properties getProperties(String fileName){
        InputStream is = MyUtils.class.getClassLoader().getResourceAsStream(fileName);
        Properties properties = new Properties();

        try {
            properties.load(is);
        } catch (IOException e) {
            e.printStackTrace();
        }

        return properties;
    }

}
